﻿@model IEnumerable<Unijovem.UI.Models.ArquivoModel>
@{
    ViewBag.Title = "Upload";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using Microsoft.Web.Helpers;
<h2>
    Upload</h2>
@*@if (Model != null)
{
    foreach (var model in Model)
    {
        <img src="@(String.IsNullOrEmpty(model.Nome) ? string.Empty : model.Nome)" id="Image" width="100px" />
    }
}*@

@*@Html.Partial("~/Views/Arquivo/ListarEdicao.cshtml", Model)
*@
@using (Html.BeginForm("Upload", "Arquivo", FormMethod.Post, new { @encType = "multipart/form-data" }))
{
    @Html.HiddenFor(model => model.First().Caminho)
    @Html.HiddenFor(model => model.First().IdExterno)
    @Html.HiddenFor(model => model.First().Tipo)
    @Html.Hidden("RedirectAction", (string)ViewBag.RedirectAction)
    @Html.Hidden("RedirectController", (string)ViewBag.RedirectController)
    @FileUpload.GetHtml(name: "fileUpload", initialNumberOfFiles: ViewBag.MultiplosArquivos == true ? 5 : 1, allowMoreFilesToBeAdded: ViewBag.MultiplosArquivos, includeFormTag: false, addText: "Incluir mais arquivos", uploadText: "Fazer upload")<br />  
    <input type="submit" name="submit" text="upload" />
}

<a href="javascript:history.back();">Voltar</a>
